//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;
using OpenLS.Drawing.Internals;

namespace OpenLS.Drawing
{
    public class FlatText : IOfficeXmlSerializable
    {
        private double _z;

        public double Z
        {
            get { return _z; }
            set { _z = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (var c = context.Read("flatTx"))
            {
                EmuConverter.FromEmu(c.GetOptionalInteger64("r", 0));
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("flatTx"))
            {
                c.SetOptionalInteger64("z", EmuConverter.ToEmu(Z), 0);
            }
        }

        #endregion
    }
}